import service from "@/utils/request";
import { startQuery } from "./model";
import { startAdd } from "./model";
const DEPT_BASE_URL = "/api/";

//显示期初数据表
class start{
static getList(queryParams?: startQuery) {
    return service<any, startQuery>({
      url: `${DEPT_BASE_URL}Start/GetStartList`,
      method: "get",
      params: queryParams,
    });
}
  //添加期初表
  static addStart(data:any[]) { return service({ url: `${DEPT_BASE_URL}Start/AddStart`, method: "post", data}); }
  //删除期初表
  static deleteStart(id: number) { return service({ url: `${DEPT_BASE_URL}Start/DeleteStart`, method: "delete", data: { startId: id } }); }
  //批量删除
  static deleteBatchStart(ids: number[]) { return service({ url: `${DEPT_BASE_URL}Start/DeleteRangeStart`, method: "put", data: { startIds: ids } }); }
  
  //修改期初表
  static updateStart(startdata?: startAdd) { return service({ url: `${DEPT_BASE_URL}Start/UpdateStart`, method: "put", data: startdata }); }
  


  
}
export default start;

// //添加期初表
// export const addStart = (data: any) => service({ url: `${DEPT_BASE_URL}Start/AddStart`, method: "post", data });
// //删除期初表
// export const deleteStart = (id: string) => service({ url: `${DEPT_BASE_URL}Start/DeleteStart?startId=${id}`, method: "delete" });


